Do not test the event mask of implicit grabs
authorKristian Rietveld <kris@gtk.org>
Tue, 15 Sep 2009 07:54:34 +0000 (09:54 +0200)
committerKristian Rietveld <kris@gtk.org>
Wed, 16 Sep 2009 06:48:49 +0000 (08:48 +0200)
The quartz backend simulates the semantics of XGrabPointer, as a part of
this it checks the event mask of the grab.  However, implicit grabs on X
do not go through XGrabPointer and thus the quartz backend should not check
the event mask for these.  This fixes various "the UI got stuck" cases.

gdk/quartz/gdkevents-quartz.c

index fc2be1657f3d5e76f1795db1c5c2f4370fbd37f3..5be38b4941a045bf8ce462933f6b85fdbf2ec94a 100644 (file)
@@ -498,7 +498,11 @@ find_window_for_ns_event (NSEvent *nsevent,
         grab = _gdk_display_get_last_pointer_grab (display);
        if (grab)
          {
-           if ((grab->event_mask & get_event_mask_from_ns_event (nsevent)) == 0)
+            /* Implicit grabs do not go through XGrabPointer and thus the
+             * event mask should not be checked.
+             */
+           if (!grab->implicit
+                && (grab->event_mask & get_event_mask_from_ns_event (nsevent)) == 0)
               return NULL;
 
             if (grab->owner_events)